package com.somnus.androidkotlindemo.activity

import android.content.Context
import android.content.Intent
import android.support.v7.app.AppCompatActivity
import android.os.Bundle
import com.somnus.androidkotlindemo.R

/***
 * ConstraintLayout 使用
 * https://juejin.im/post/5a1d9ba66fb9a044fb07819e
 */
class ConstraintLayoutActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_constraint_layout)

    }

    //创建一个 伴生对象
    companion object {
        fun startConstraintLayoutActivity(context: Context) {

            val mIntent = Intent()
            mIntent.setClass(context, ConstraintLayoutActivity::class.java)
            context.startActivity(mIntent)
        }
    }
}
